<?php
$sql = "SELECT * from `".$m_name."_conf` WHERE `conf_sub` = '".$m_name."' and `conf_m` = '1' ";
$result = mysql_query($sql,$mysql_conn);
@$row=mysql_fetch_array($result);
$conf_islogin = $row['conf_islogin'];
$conf_istype = $row['conf_istype'];
if ($conf_islogin == "1") {
	if (empty($user_id) || empty($user_name) || empty($user_type) || empty($type_name)) {
		require('./statics/islogin.php'); 
		exit;
	}
}
if (!empty($conf_istype)) {
	$m_type = explode(',',$conf_istype); 
	if (in_array($user_type, $m_type)) {
	} else {
		require('./statics/istype.php'); 
		exit;
	}
}
$sql = "SELECT * from `".$m_name."_conf` WHERE `conf_sub` = '".$c_name."' and `conf_c` = '1' ";
$result = mysql_query($sql,$mysql_conn);
@$row=mysql_fetch_array($result);
$conf_islogin = $row['conf_islogin'];
$conf_istype = $row['conf_istype'];
if ($conf_islogin == "1") {
	if (empty($user_id) || empty($user_name) || empty($user_type) || empty($type_name)) {
		require('./statics/islogin.php'); 
		exit;
	}
}
if (!empty($conf_istype)) {
	$c_type = explode(',',$conf_istype); 
	if (in_array($user_type, $c_type)) {
	} else {
		require('./statics/istype.php'); 
		exit;
	}
}
$sql = "SELECT * from `".$m_name."_conf` WHERE `conf_sub` = '".$a_name."' and `conf_a` = '1' ";
$result = mysql_query($sql,$mysql_conn);
@$row=mysql_fetch_array($result);
$conf_islogin = $row['conf_islogin'];
$conf_istype = $row['conf_istype'];
if ($conf_islogin == "1") {
	if (empty($user_id) || empty($user_name) || empty($user_type) || empty($type_name)) {
		require('./statics/islogin.php'); 
		exit;
	}
}
if (!empty($conf_istype)) {
	$a_type = explode(',',$conf_istype); 
	if (in_array($user_type, $a_type)) {
	} else {
		require('./statics/istype.php'); 
		exit;
	}
}